package com.blogs.web.game.factory.typefactory;

import com.blogs.web.game.Game;
import com.blogs.web.game.factory.AbstractFactory;
import com.blogs.web.game.type.Mammoth;
import com.blogs.web.game.type.Roach;
import com.blogs.web.game.type.Spitter;

/**
 * @Author: xiaokai
 * @Description: 外星虫族工厂坐标
 * @Date: 2019/8/18
 * @Version: 1.0
 */
public class AlienFactory implements AbstractFactory {
    //外星虫族工厂坐标
    private int x;
    private int y;

    public AlienFactory(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public Game createLowClass() {
        Game game = new Roach(x, y);
        System.out.println("制造蟑螂兵成功。");
        return game;
    }

    @Override
    public Game createMidClass() {
        Game game = new Spitter(x, y);
        System.out.println("制造毒液兵成功。");
        return game;
    }

    @Override
    public Game createHighClass() {
        Game game = new Mammoth(x, y);
        System.out.println("制造猛犸巨兽成功。");
        return game;
    }
}
